home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Over 1,000 Windows 95 Programs
/
Over 1000 Windows 95 Programs (Microforum) (Disc 2).iso
/
1276
/
test30.frm
< prev
next >
Wrap
Text File
|
1996-02-20
|
4KB
|
166 lines
VERSION 2.00
Begin Form TestForm
Caption = "This is a test project for Project Analyzer"
ClientHeight = 1080
ClientLeft = 1095
ClientTop = 1485
ClientWidth = 5160
Height = 1485
Icon = TEST30.FRX:0000
Left = 1035
LinkTopic = "Form1"
ScaleHeight = 1080
ScaleWidth = 5160
Top = 1140
Width = 5280
Begin DriveListBox Drive1
Height = 315
Left = 210
TabIndex = 2
Top = 630
Width = 2535
End
Begin CommandButton Quit
Caption = "Quit"
Height = 330
Left = 3780
TabIndex = 0
Top = 630
Width = 1275
End
Begin Image Image1
Height = 480
Left = 4515
Picture = TEST30.FRX:0302
Top = 45
Width = 480
End
Begin Label Label1
Caption = "This program will not do anything"
Height = 330
Left = 210
TabIndex = 1
Top = 90
Width = 4320
End
End
' ProjTest.Frm - a test project for Project Analyzer
' (C)1995 MyCompany Ltd.
' This is the form of the main screen
' This file also includes some important database routines
DefStr W
Dim DatabaseName As String
Dim DatabaseOpen As Integer
Dim Weekdays(0 To 6)
Const MAX_BUTTONS = 50
Dim Button(0 To MAX_BUTTONS) As CommandButton
Dim FName As String
' This is a module-level variable that overrides the
' global variable FName in FILETEST.BAS
Sub CloseDatabase ()
' Close the database
' Check that all information is up-to-date
End Sub
Function ExtensionOnly (ByVal File As String) As String
' Returns file name extension "BAS"
' This is a module-level function that will override
' the global function ExtensionOnly defined in FILETEST.BAS
ExtensionOnly = Right(File, 3)
End Function
Function Fibonacci (ByVal n As Integer)
' Sample of a recursive call sequence
' This function is only called by SumFibonacci
' but not by any other procedure
' -> Fibonacci and SumFibonacci are dead code
If n = 1 Then
Fibonacci = 1
ElseIf n = 2 Then
Fibonacci = 1
Else
Fibonacci = SumFibonacci(n - 1, n - 2)
End If
End Function
Sub Form_Load ()
' Start of the program
Set Button(0) = Quit
ReadINIFile
OpenDB
RunTheProgram
End Sub
Sub Form_Unload (Cancel As Integer)
' Quit the program
' First close the database
CloseDatabase
End
End Sub
Sub OpenDB ()
' Opening the DB
' Check for user rights
' Lock appropriate tables
If ExtensionOnly(FName) = "TXT" Then
' It is a text database
ElseIf IsDir("C:\WINDOWS") Then
If DriveType("C:", Drive1) <> DRIVE_FIXED Then
' Panic
Else
' Don't panic
End If
End If
End Sub
Sub Quit_Click ()
Unload Me
End Sub
Sub ReadINIFile ()
' Read the configuration in PROJTEST.INI
' Note: If PROJTEST.INI doesn't exist, use defaults
IsThere = IsFile("PROJTEST.INI")
End Sub
Sub RunTheProgram ()
' Run the program only if there is at least 1 MB free
' disk space
' Otherwise show error message
If DiskSpaceFree("C:") < 1024 ^ 2 Then
End If
End Sub
Function SumFibonacci (a, b)
' Sample of a recursive call sequence
' This function is only called by Fibonacci
' but not by any other procedure
' -> Fibonacci and SumFibonacci are dead code
SumFibonacci = Fibonacci(a) + Fibonacci(b)
End Function